package com.framework.spring.lifeCycle.circularDependency.bean;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j(topic = "e")
@Component
public class N implements InitializingBean {

	@Autowired
	private M m;

	public N() {
		log.info("N construct");
	}

	public void printf() {
		log.info("N#printf");
	}


	@Override
	public void afterPropertiesSet() throws Exception {
		log.info("N.afterPropertiesSet 的初始化回调");
		m.printf();
	}
}
